home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iHabitat.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  5KB  |  223 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // ihabitat.h
  5. //
  6. // API for the package ihabitat - functions for manipulation of space stations
  7. // and settlements.
  8. //
  9. // Revision control information:
  10. //
  11. // $Header:
  12. //
  13.  
  14. #include "Flux.h"
  15.  
  16. #ifdef FLUX_COMPILE
  17.  
  18. FLUX_DECLARE_EXTENSION(iHabitat);
  19.  
  20. #ifdef FLUX_LIB
  21. #if _MSC_VER >= 1000
  22. #pragma comment( lib, "iHabitat" )
  23. #endif // _MSC_VER >= 1000
  24. #endif // FLUX_LIB
  25.  
  26. #else
  27.  
  28. // Dependencies
  29. uses Sim, Set, iMapEntity, iBody;
  30.  
  31. // Declare handle type
  32. handle hhabitat : hmapentity;
  33.  
  34. // Handle manipulation ////////////////////////////////////////////////////////
  35.  
  36. //
  37. // hhabitat Cast( hobject object_handle )
  38. //
  39. // Cast an object to a habitat.
  40. //
  41. prototype hhabitat iHabitat.Cast( hobject object_handle );
  42.  
  43. // Accessors ///////////////////////////////////////////////////////////////////
  44.  
  45. //
  46. // int Population( hhabitat habitat )
  47. //
  48. // Determine the total population of a given habitat.
  49. //
  50. prototype int iHabitat.Population( hhabitat habitat );
  51.  
  52. //
  53. // int Corporates( hhabitat habitat )
  54. //
  55. // Determine the corporate population of a given habitat.
  56. //
  57. prototype int iHabitat.Corporates( hhabitat habitat );
  58.  
  59. //
  60. // int Independents( hhabitat habitat )
  61. //
  62. // Determine the independent population of a given habitat.
  63. //
  64. prototype int iHabitat.Independents( hhabitat habitat );
  65.  
  66. //
  67. // int Exiles( hhabitat habitat )
  68. //
  69. // Determine the exile population of a given habitat.
  70. //
  71. prototype int iHabitat.Exiles( hhabitat habitat );
  72.  
  73. //
  74. // int Military( hhabitat habitat )
  75. //
  76. // Determine the military population of a given habitat.
  77. //
  78. prototype int iHabitat.Military( hhabitat habitat );
  79.  
  80. //
  81. // int Underworld( hhabitat habitat )
  82. //
  83. // Determine the underworld population of a given habitat.
  84. //
  85. prototype int iHabitat.Underworld( hhabitat habitat );
  86.  
  87. //
  88. // int Government( hhabitat habitat )
  89. //
  90. // Determine the government population of a given habitat.
  91. //
  92. prototype int iHabitat.Government( hhabitat habitat );
  93.  
  94. //
  95. // int Transient( hhabitat habitat )
  96. //
  97. // Determine the transient population of a given habitat.
  98. //
  99. prototype int iHabitat.Transient( hhabitat habitat );
  100.  
  101. //
  102. // int Society( hhabitat habitat )
  103. //
  104. // Determine the society population of a given habitat.
  105. //
  106. prototype int iHabitat.Society( hhabitat habitat );
  107.  
  108. //
  109. // IeAllegiance Allegiance( hhabitat habitat )
  110. //
  111. // Determine the allegiance of a given habitat.
  112. //
  113. prototype IeAllegiance iHabitat.Allegiance( hhabitat habitat );
  114.  
  115. //
  116. // IeHabitatType Type( hhabitat habitat )
  117. //
  118. // Determine the type of a given habitat (e.g. water mine, resort)
  119. //
  120. prototype IeHabitatType iHabitat.Type( hhabitat habitat );
  121.  
  122. //
  123. // bool IsOrbiting( hhabitat habitat )
  124. //
  125. // Determine whether a habitat is orbiting or surface based
  126. //
  127. prototype bool iHabitat.IsOrbiting( hhabitat habitat );
  128.  
  129. //
  130. // IeHabitatType CastIntToHabitatType( int index )
  131. //
  132. // Cast an int up to a member of the habitat type enumerator
  133. //
  134. prototype IeHabitatType iHabitat.CastIntToHabitatType( int index );
  135.  
  136. // Find functions //////////////////////////////////////////////////////////////
  137.  
  138. //
  139. // hhabitat FindByName( string name )
  140. //
  141. // Try to find a habitat in the system with the given name.
  142. //
  143. prototype hhabitat iHabitat.FindByName( string name );
  144.  
  145. //
  146. // hhabitat Nearest( set habitats, hsim sim )
  147. //
  148. // Of the habitats in the given set, find the one closest to the given sim.
  149. //
  150. prototype hhabitat iHabitat.Nearest( set habitats, hsim sim );
  151.  
  152. //
  153. // hhabitat Random( set habitats )
  154. //
  155. // Pick a random habitat from the given set.
  156. //
  157. prototype hhabitat iHabitat.Random( set habitats );
  158.  
  159. //
  160. // set FilterOnType( set habitats, IeHabitatType type )
  161. //
  162. // Filter the given set with habitat type.
  163. //
  164. prototype set iHabitat.FilterOnType( set habitats, IeHabitatType type );
  165.  
  166. //
  167. // set FilterOrbiting( set habitats )
  168. // 
  169. // Filter the given set down to only those habitats which are in orbit.
  170. //
  171. prototype set iHabitat.FilterOrbiting( set habitats );
  172.  
  173. //
  174. // set FilterOnAllegiance( set habitats )
  175. // 
  176. // Filter the given set down to only those habitats with the given allegiance.
  177. //
  178. prototype set iHabitat.FilterOnAllegiance( set habitats, IeAllegiance alleg );
  179.  
  180. //
  181. // bool HasSpewer( hhabitat habitat )
  182. //
  183. // Returns true if the station has a spewer
  184. //
  185. prototype bool iHabitat.HasSpewer( hhabitat station );
  186.  
  187. //
  188. // bool HasSpewerSlotFree( )
  189. //
  190. // Returns true if the station has a free spewer slot
  191. //
  192. prototype bool iHabitat.HasSpewerSlotFree( hhabitat station );
  193.  
  194. //
  195. // bool Spew( hhabitat station, hsim cargo_pod )
  196. //
  197. // Spews the given cargo pod on a free spewer
  198. //
  199. prototype bool iHabitat.Spew( hhabitat station, hsim cargo_pod );
  200.  
  201. //
  202. // SetReactiveFunction( string function )
  203. //
  204. // Sets the reactive function for stations
  205. //
  206. prototype iHabitat.SetReactiveFunction( string reactive_function );
  207.  
  208. //
  209. // SetArmed
  210. //
  211. // Arms or disarms the station
  212. //
  213. prototype iHabitat.SetArmed( hhabitat station, bool state );
  214.  
  215. //
  216. // SetArmedWithTarget
  217. //
  218. // Arms the station for the given target.
  219. //
  220. prototype iHabitat.SetArmedWithTarget( hhabitat station, hisim target );
  221.  
  222. #endif // FLUX_LIB
  223.